Simulation 3

Data structure: \(O = (W, A, Z, Y)\)

  • U - exogenous variables
  • W - baseline covariate that is a measure of body condition
  • A - treatment level based on W, continuous between 0 and 5
  • Z - intermediate curve based on W and A
  • Y - outcome, indicator of an event ?

Underlying data generating process, \(P_{U,X}\)

  • Exogenous variables:
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 1^2)\)
    • \(U_A \sim Normal(\mu=0, \sigma^2 = 2^2)\)
    • \(U_Z \sim Uniform(min = 0, max = 1)\)
    • \(U_Y \sim Uniform(min = 0, max = 1)\)
  • Structural equations F and endogenous variables:
    • \(W = U_W\)
    • \(A = bound(2 - 0.5W + U_A, min=0, max=5)\)
    • \(Z = \mathbf{I}[U_Z < expit(2-W-A)]\)
    • \(Y = \mathbf{I}[U_Y < expit(-10 - 3W + 2A + Z(5 + 2 sin(A^2) - 20 \mathbf{I}(A>4)))]\)
##        W                  A               Z                Y         
##  Min.   :-3.71792   Min.   :0.000   Min.   :0.0000   Min.   :0.0000  
##  1st Qu.:-0.65715   1st Qu.:0.606   1st Qu.:0.0000   1st Qu.:0.0000  
##  Median : 0.01527   Median :1.987   Median :0.0000   Median :0.0000  
##  Mean   : 0.01455   Mean   :2.098   Mean   :0.4828   Mean   :0.2507  
##  3rd Qu.: 0.68169   3rd Qu.:3.347   3rd Qu.:1.0000   3rd Qu.:1.0000  
##  Max.   : 4.34792   Max.   :5.000   Max.   :1.0000   Max.   :1.0000
## Summary of A given W < -1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   1.331   2.656   2.623   3.930   5.000
## Summary of A given -1 < W <= 0:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.9508  2.2621  2.3268  3.6176  5.0000
## Summary of A given 0 < W <= 1:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##  0.0000  0.3793  1.7606  1.9012  3.0529  5.0000
## Summary of A given 1 < W:
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   0.000   0.000   1.285   1.536   2.569   5.000

n = 500

CV HAL

results

## CV selected lambda (from one sample): 0.00179663135270864

1000 repetition

## The average of CV selected lambdas (from 1000 sample): 0.00167069905743632
## z=1:

## z=0:

Globally Undersmoothed HAL

results

## Undersmoothed lambda: 0.000291732819942546
##  which is 0.162377673918872 * lambda_CV

1000 repetition

## The average of unsersmoothed lambda (from 1000 sample): 0.000270475505996292
##  which is 0.155768441258726 * the average of 1000 lambda_CV
## z=1:

## z=0:

CV vs Undersmoothing

## z=1:

## z=0:

n = 1000

CV HAL

results

## CV selected lambda (from one sample): 0.000284242765357572

1000 repetition

## The average of CV selected lambdas (from 1000 sample): 0.00072537755501008
## z=1:

## z=0:

Globally Undersmoothed HAL

results

## Undersmoothed lambda: 4.61546790670303e-05
##  which is 0.162377673918872 * lambda_CV

1000 repetition

## The average of unsersmoothed lambda (from 1000 sample): 0.000103940431379792
##  which is 0.146789904758241 * the average of 1000 lambda_CV
## z=1:

## z=0:

CV vs Undersmoothing

## z=1:

## z=0: